windowBoundingRect
Type
property
Summary
Specifies the rectangle in which windows may open and zoom or maximize.
Syntax
set the windowBoundingRect to <left>, <top>, <right>, <bottom>
Description
Use the windowBoundingRect property to ensure free space on the screen for toolbars or other information on the screen.
When the user zooms (on Mac OS systems) or maximizes (on Unix and Windows systems) the window, its zoomed or maximized size is constrained by the windowBoundingRect.
Users can drag or resize windows to extend outside the windowBoundingRect, and a handler can move or resize a window so that it's outside the windowBoundingRect. This property constrains the default position of windows when they open or zoom, but does not prevent them from being manually resized or repositioned.
The windowBoundingRect value is checked against the window's position before the preOpenStack message is sent. This means that if you want a stack to extend outside the windowBoundingRect, you should set its rectangle property to the desired value in a preOpenStack handler. This ensures that the window is enlarged to the size you specify before it appears, instead of being resized when the windowBoundingRect is checked.
The value of the windowBoundingRect does not affect palette, modal, or modeless windows. Only stacks whose mode property is 1 or 2 are affected.
If a stack's formatForPrinting property is set to true, the windowBoundingRect is ignored when the stack is opened.
The value of the windowBoundingRect is not updated automatically when you change the screen resolution or when you move items such as the Windows task bar. For example, if the windowBoundingRect is set to 0,0,640,480, it is not changed if you change the screen resolution to 1024x768. If you change the screen settings after starting up the application, make sure the value of the windowBoundingRect property is still appropriate.
Changing the windowBoundingRect does not affect the position of windows that are already open.
Examples
set the windowBoundingRect to 100,20,800,600
Related
property: mode, maxWidth, zoom
command: modeless, palette, modal
function: value, screenRect
glossary: property, rectangle, handler, Windows, menu bar, message, Mac OS, integer, task bar
message: preOpenStack
object: stack
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
mobile